﻿<%@ Page Title="【我的积分】" Language="C#" MasterPageFile="~/APP_Master/MasterPage_integral_shop.master"
    AutoEventWireup="true" CodeFile="integral_my.aspx.cs" Inherits="integral_my" %>
    
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register src="~/APP_Controls/integral/Integral_Que.ascx" tagname="Integral_Que" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server"> 
    <script src="../js/jquery-1.9.1.js" type="text/javascript"></script>
            <script type="text/javascript">
                function loginout() {
                    jQuery.ajax({
                        url: "../Ajax/MemberLogin.ashx",
                        data: { t: 'login_out' },
                        type: "POST",
                        success: function (data) {
                            parent.window.location.href = 'integral_index.aspx?p=1'; 
                        }
                    });
                }
                </script> 
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<!--Content-->
<div class="integral_index_area" id="leftbox">
<!--Left-->
<div class="integral_index_left white_bg">
    <!--IntegralleftTop-->
    <div class="my_i_leftbox">
        <div class="i_my_head"><img src="../images/2015102200.gif" alt="" /></div>
        <div class="i_my_integral">
            <p class="my_user"><a href="/personal.aspx"><%=modelcm!=null?modelcm.nickname:"welcome!"%> </a>
                
            <a href="javascript:loginout();">退出</a></p>
            <p class="my_i">积分：<%=uaccout!=null?uaccout.integralTotal:0%></p>
        </div>
        <div class="integral_show">
            <p>最近一月获得积分：<em><%=Convert.ToDecimal(dt.Rows[0]["huode"].ToString() != "" ? dt.Rows[0]["huode"].ToString() : "0")%></em></p>
            <p>最近一月使用积分：<%=Convert.ToDecimal(dt.Rows[0]["xiaofei"].ToString() != "" ? dt.Rows[0]["xiaofei"].ToString() : "0")%></p>
        </div>
        <h2 class="integral_luckydraw_title i_line">商城公告</h2>
        <div class="integral_left_note">
            <p>实物礼品只在工作日发送</p>
            <p>虚拟物品兑换后立即发放</p>
            <p><a href="integral_help.aspx?p=4">查看商城公告</a></p>
        </div>
    </div>
    <!--IntegralleftTop-->
    <uc1:Integral_Que ID="Integral_Que1" runat="server" />
</div>
<!--Left-->
<!--Right-->
<div class="draw_right" id="rightbox">
    <ul class="integral_right_nav">
        <li><a href="integral_my.aspx?p=3&i=0&type=2" <%if(i==0){ %>class="cur"<%} %>>积分消耗</a></li>
        <li><a href="integral_my.aspx?p=3&i=2&type=1" <%if(i==2){ %>class="cur"<%} %>>积分获得</a></li>
    </ul>
    <div class="integral_search"> 
            <dl class="select03">
             <asp:DropDownList ID="timesl" runat="server" AutoPostBack="true" 
                    onselectedindexchanged="timesl_SelectedIndexChanged"  >
             <asp:ListItem value="5">全部</asp:ListItem>
             <asp:ListItem value="0">今天</asp:ListItem>
                                        <asp:ListItem value="1">近一周</asp:ListItem>
                                        <asp:ListItem value="2">近一个月</asp:ListItem>
                                        <asp:ListItem value="3">近三个月</asp:ListItem>
                                        <asp:ListItem value="4">近六个月</asp:ListItem> 
            </asp:DropDownList>  
	        </dl>
      <%--  <asp:Button ID="Button1" runat="server" Text="查询" CssClass="i_s_btn" />--%>
        <span>您可以查询近6个月的交易记录</span>
    </div>
    <ul class="per_inte_title_ul">
        <li style="width:25%">订单编号</li> 
        <li style="width:25%">订单商品</li>
        <%if (type == 2)
          { %> 
        <li style="width:25%">消耗积分</li><%}
          else
          {%>
        <li style="width:25%">获得积分</li>
        <%} %>
        <li style="width:25%">时间</li><%--
        <li>操作</li>--%>
    </ul>
     <%if (userOrder != null)
       {
           for (int n = 0; n < userOrder.Count; n++)
           {%>
    <ul class="per_inte_con_ul">
        <li style="width:25%"><%=userOrder[n].OrderId%></li> 
        <li style="width:25%"><%=userOrder[n].Content%></li>
        <li style="width:25%"><b><%=userOrder[n].UseIntegral%></b></li>
        <li style="width:25%"><%=userOrder[n].Addtime.ToString("yyyy-MM-dd")%></li>
        <%--<li><a href="">查看详情</a></li>--%>
    </ul>   
    <%}
       }
       else
       {%>
                  <div >
                     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;没有记录,点击提交查询进行查询
                     </div> 
                    <% }%>
    <!--Pages-->
           <div class="sabrosus">
               <webdiyer:aspnetpager SubmitButtonClass="buttons"  ID="AspNetPager1" 
                    runat="server" AlwaysShow="True" FirstPageText="首页"
                        NextPageText="下一页" PrevPageText="前一页" LastPageText="尾页" PageSize="8"  
                        OnPageChanged="AspNetPager1_PageChanged">
                    </webdiyer:aspnetpager>
           </div>
           <!--Pages-->
</div>
<!--Right-->
</div>
<!--Content-->

<script type="text/javascript">  
  <!--
    var a = document.getElementById("leftbox");
    var b = document.getElementById("rightbox");
    if (a.clientHeight < b.clientHeight) {
        a.style.height = b.clientHeight + "px";
    }
    else {
        b.style.height = a.clientHeight + "px";
    }    
  -->    
</script>
</asp:Content>
